package com.fzu.ess.sys.utils;

import com.fzu.ess.sys.entity.Menu;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * Created by ercha on 2015/10/16.
 */
public class MenuUtils {
    public static Set<String> getPermissionsNames(List<Menu> menuList){
        Set<String> permissionName = new HashSet<>();
        if(menuList == null) return null;
        for(Menu menu: menuList){
            permissionName.add(menu.getPermission());
        }
        System.out.println(permissionName);
        return permissionName;
    }
}
